﻿using System;
using System.Collections.Generic;

public class SalesReportData
{
    public class SingleSale
    {
        public int ProductID { get; private set; }

        public decimal Quantity { get; private set; }

        public decimal UnitPrice { get; private set; }

        public decimal Sum { get; private set; }

        public SingleSale(int productID, decimal quantity, decimal unitPrice, decimal sum)
        {
            this.ProductID = productID;
            this.Quantity = quantity;
            this.UnitPrice = unitPrice;
            this.Sum = sum;
        }
    }

    public string SupermarketName { get; private set; }

    public DateTime SalesDate { get; private set; }

    public List<SingleSale> Data { get; private set; }

    public SalesReportData(string supermarketName, DateTime salesDate)
    {
        this.SupermarketName = supermarketName;
        this.SalesDate = salesDate;
        this.Data = new List<SingleSale>();
    }

    public void AddSale(int productID, decimal quantity, decimal unitPrice, decimal sum)
    {
        SingleSale newSale = new SingleSale(productID, quantity, unitPrice, sum);
        this.Data.Add(newSale);
    }
}